/*
 * AssignDataFileBO.java 
 * 
 * Copyright 2009 Wangfeng Beijing Inc. 
 * All rights reserved. 
 * 
 * Created on 2012-08-09
 */

package com.bjtech.domain;

import java.text.SimpleDateFormat;
import java.util.Date;
import org.ssi.web.struts.bean.BaseBean;

/**
 * 功能概述:分配表数据文件 <br>
 * 
 * @author 王峰
 */

public class AssignDataFile extends BaseBean {
	/* */
	private Long id;
	/* */
	private String file_name;
	/* */
	private Date upload_date;
	/* */
	private Float file_size;
	/* */
	private Long record_num;
	/* */
	private Long success_num;
	/* */
	private Float upload_per;
	/* */
	private String upload_man;
	
	private String save_url;

	public AssignDataFile(){}
	
	public AssignDataFile(String fileName, Date uploadDate, Float fileSize) {
		super();
		file_name = fileName;
		upload_date = uploadDate;
		file_size = fileSize;
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getFile_name() {
		return this.file_name;
	}

	public void setFile_name(String file_name) {
		this.file_name = file_name;
	}

	public Date getUpload_date() {
		return this.upload_date;
	}

	public void setUpload_date(Date upload_date) {
		this.upload_date = upload_date;
	}

	public Float getFile_size() {
		return this.file_size;
	}

	public void setFile_size(Float file_size) {
		this.file_size = file_size;
	}

	public Long getRecord_num() {
		return this.record_num;
	}

	public void setRecord_num(Long record_num) {
		this.record_num = record_num;
	}

	public Long getSuccess_num() {
		return this.success_num;
	}

	public void setSuccess_num(Long success_num) {
		this.success_num = success_num;
	}

	public Float getUpload_per() {
		return this.upload_per;
	}

	public void setUpload_per(Float upload_per) {
		this.upload_per = upload_per;
	}

	public String getUpload_man() {
		return this.upload_man;
	}

	public void setUpload_man(String upload_man) {
		this.upload_man = upload_man;
	}

	public String getSave_url() {
		return save_url;
	}

	public void setSave_url(String saveUrl) {
		save_url = saveUrl;
	}
	
	public String createUploadEvent(){
		String dateString = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.upload_date);
		
		return dateString+"：读取了文件 "+this.file_name+" ，其中包含"+this.record_num+"条"+"，成功读取"+this.success_num+"条";
	}
}
